package main

import "fmt"

// 接口嵌套

type SayInterface interface {
	say()
}

type MoveInterface interface {
	move()
}

type Animal interface {
	SayInterface
	MoveInterface
}

type Cat struct {
	name string
}

func (c Cat) say() {
	fmt.Println("喵~")
}

func (c *Cat) move() {
	fmt.Printf("%v is moving...", c.name)
}

func main() {
	c := Cat{
		name: "小红",
	}
	var c1 Animal = &c
	c1.say()
	c1.move()
}
